{template 'public/header'}
{template 'public/comhead'}
<link rel="stylesheet" type="text/css" href="../addons/zh_jypx/template/public/ygcsslist.css">
<style type="text/css">
    .yg5_key>div{float: left;line-height: 34px;}
    .store_td1{height: 45px;}
    .store_list_img{width: 40px;height: 40px;}
    .yg5_tabel{border-color: #e5e5e5;outline: 1px solid #e5e5e5;}
    .yg5_tr2>td{padding: 10px;border: 1px solid #e5e5e5;text-align: center;}
    .yg5_tr1>td{
        border: 1px solid #e5e5e5;
        padding-left: 15px;
        background-color: #FAFAFA;
        font-weight: bold;
        text-align: center;
    }
    .yg5_btn{background-color: #EEEEEE;color: #333;border: 1px solid #E4E4E4;border-radius: 6px;width: 100px;height: 34px;}
    .jfbtn{background-color: #44ABF7;color: white;}
    .jfbtn:hover{background-color: #44ABF7;color: white;}
</style>
<ul class="nav nav-tabs">
    <span class="ygxian"></span>
    <div class="ygdangq">当前位置:</div>    
    <li class="active"><a href="{php echo $this->createWebUrl('prize')}">奖品管理</a></li>
    <li><a href="{php echo $this->createWebUrl('addprize')}">添加奖品</a></li>
</ul>
<div class="main">
    <div class="panel panel-default">
        <div class="panel-body">
              <form action="" method="get" class="col-md-4">
          <input type="hidden" name="c" value="site" />
          <input type="hidden" name="a" value="entry" />
          <input type="hidden" name="m" value="zh_jypx" />
          <input type="hidden" name="do" value="prize" />
            <div class="input-group" style="width: 300px">
                <input type="text" name="keywords" class="form-control" placeholder="奖品名称/描述关键字">
                <span class="input-group-btn">
                    <input type="submit" class="btn btn-default" name="submit" value="查找"/>
                </span>
            </div>
            <input type="hidden" name="token" value="{$_W['token']}"/>
           <input type="hidden" name="type" value="all"/>
        </form>
    </div>
</div>
        <div class="panel panel-default">
           <!--  <div class="panel-heading">
                奖品列表
            </div> -->
            <div class="panel-body" style="padding: 0px 15px;">
                <div class="row">
                    <table class="yg5_tabel col-md-12">
                        <tr class="yg5_tr1">
                            <td class="store_td1 col-md-1">奖品名称</td>
                            <td class="col-md-1">奖品图片</td>
                            <td class="col-md-1">奖品总数量</td>
                            <td class="col-md-1">所需积分</td>
                            <td class="col-md-2">奖品名称</td>
                            <td class="col-md-2">添加时间</td>
                            <td class="col-md-2">领奖记录</td>
                            <td class="col-md-1">操作</td>
                        </tr>
                        {loop $list $row}
                        <tr class="yg5_tr2">
                            <td>{$row['name']}</td>
                            <td><div class="type-parent"><img height="40" src="{media $row['pic']}">&nbsp;&nbsp;</div></td>
                            <td>{$row['num']}</td>
                            <td>{$row['need_score']}</td>
                            <td>{$row['description']}</td>
                            <td>{$row['create_time']}</td>
                            <td><a class="btn jfbtn btn-xs" href="{php echo $this->createWebUrl('receivelist', array('prize_id' => $row['id']))}" title="查看列表">查看列表</a></td>
                            <td> 
                                <a href="{php echo $this->createWebUrl('addprize', array('id' => $row['id']))}" class="storespan btn btn-xs">
                                    <span class="fa fa-pencil"></span>
                                    <span class="bianji">编辑
                                        <span class="arrowdown"></span>
                                    </span>                            
                                </a>
                                <a href="javascript:void(0);" class="storespan btn btn-xs" data-toggle="modal" data-target="#myModal{$row['id']}">
                                    <span class="fa fa-trash-o"></span>
                                    <span class="bianji">删除
                                        <span class="arrowdown"></span>
                                    </span>
                                </a>
                               
                               
                            </td>
                        </tr>
                <div class="modal fade" id="myModal{$row['id']}" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
                      <div class="modal-dialog" role="document">
                        <div class="modal-content">
                          <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                            <h4 class="modal-title" id="myModalLabel" style="font-size: 20px;">提示</h4>
                        </div>
                        <div class="modal-body" style="font-size: 20px">
                            确定删除么？
                        </div>
                        <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                            <a href="{php echo $this->createWebUrl('prize', array('op'=>delete,'id'=>$row['id']))}" type="button" class="btn btn-info" >确定</a>
                        </div>
                    </div>
                </div>
            </div>
            <!-- <div class="modal fade" id="myModalb{$row['id']}" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
                        <div class="modal-dialog" role="document">
                            <div class="modal-content">
                                <div class="modal-header">
                                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                                    <h4 class="modal-title" id="myModalLabel" style="font-size: 20px;">提示</h4>
                                </div>
                                <div class="modal-body" style="font-size: 20px">
                                    确定要通过么？
                                </div>
                                <div class="modal-footer">
                                    <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                                    <a href="{php echo $this->createWebUrl('check', array('op'=>change,'status' => 1, 'id' => $row['id']))}" type="button" class="btn btn-info" >确定</a>
                                </div>
                            </div>
                        </div>
                    </div> -->
                    <!-- <div class="modal fade" id="myModalc{$row['id']}" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
                        <div class="modal-dialog" role="document">
                            <div class="modal-content">
                                <div class="modal-header">
                                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                                    <h4 class="modal-title" id="myModalLabel" style="font-size: 20px;">提示</h4>
                                </div>
                                <div class="modal-body" style="font-size: 20px">
                                    确定要拒绝么？
                                </div>
                                <div class="modal-footer">
                                    <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                                    <input type="hidden" name="token" value="{$_W['token']}" />
                                    <input type="hidden" name="id" value="{$row['id']}" />
                                    <a href="{php echo $this->createWebUrl('check', array('op'=>change,'status' => 2, 'id' => $row['id']))}" type="button" class="btn btn-info" >确定</a>
                                </div>
                            </div>
                        </div>
                    </div> -->
                        {/loop}
                   {if empty($list)}
                        <tr class="yg5_tr2">
                            <td colspan="8">
                              暂无奖品
                            </td>
                        </tr>         
                    {/if}
                    </table>
                </div>
            </div>
        </div>
   
</div>
<div class="text-right we7-margin-top">{$pager}</div>
<script type="text/javascript">
    $(function(){
        // $("#frame-8").addClass("in");
        $("#frame-9").show();
        $("#yframe-9").addClass("wyactive");
    })
</script>